
#pragma once

#include <cstdint>
#include <iostream>
#include <string>
#include <cstring>
#include <memory>
#include <functional>
#include "rtmp_message.h"


class RtmpMessageProcessLogic
{
public:
    RtmpMessageProcessLogic();
    int ProcessRtmpMsg(RtmpPacketMsg & message, RtmpPacketMsg & response);
    void ProcessConnect(RtmpPacketMsg & msg, RtmpPacketMsg & response);
    void ProcessCreateStream(RtmpPacketMsg & request, RtmpPacketMsg & response);
    void ProcessReleaseStream(RtmpPacketMsg & request, RtmpPacketMsg & response);
    void ProcessPlay(RtmpPacketMsg & request, RtmpPacketMsg & response);
    void ProcessFCPublish(RtmpPacketMsg & request, RtmpPacketMsg & response);
    void ProcessPublish(RtmpPacketMsg & request, RtmpPacketMsg & response);
private:
    void ProcessOnStatus(RtmpPacketMsg & response);
private:
    uint32_t m_stream_id;
    std::string m_stream_app;
    std::string m_stream_name;
};


